package com.sina.shop.service.order;

import com.sina.shop.core.BaseService;
import com.sina.shop.core.exception.client.DataException;
import com.sina.shop.core.exception.server.CreateException;
import com.sina.shop.core.exception.server.ResourceExistsException;
import com.sina.shop.core.exception.server.UpdateException;
import com.sina.shop.domain.order.Order;
import com.sina.shop.domain.order.Status;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2018-02-06-10:50
 */
public interface OrderService extends BaseService {

    //根据用户id得到订单列表
    List<Order> getOrderListByAdminId(Long adminId, Status status);

    Order getOrder(Long id);

    //根据id删除订单
    Integer deleteOrder(Long id) throws UpdateException, DataException;

    //根据id更新订单的状态
    Integer updateOrderStatus(Long id, Status status) throws UpdateException, DataException;

    Order saveOrder(Order order) throws CreateException, ResourceExistsException, DataException;

    Order updateOrder(Order order) throws UpdateException, DataException;
}
